<template>
	<el-main class="bg table_wrap">
		<el-form label-position="right" :model="form" class="form p_4" label-width="120">
			<el-row>
				<el-col :xs="24" :sm="24" :lg="12">
					<el-form-item label="收藏ID">
						<el-input v-model="form.collect_id" disabled></el-input>
					</el-form-item>
				</el-col>

				<el-col :xs="24" :sm="24" :lg="12">
					<el-form-item label="用户ID">
						<el-input v-model="form.user_id" disabled></el-input>
					</el-form-item>
				</el-col>

				<el-col :xs="24" :sm="24" :lg="12">
					<el-form-item label="标题">
						<el-input v-model="form.title" disabled></el-input>
					</el-form-item>
				</el-col>

				<el-col :xs="24" :sm="24" :lg="12">
					<el-form-item label="来源表">
						<el-input v-model="form.source_table" disabled></el-input>
					</el-form-item>
				</el-col>

				<el-col :xs="24" :sm="24" :lg="12">
					<el-form-item label="来源ID">
						<el-input v-model="form.source_id" disabled></el-input>
					</el-form-item>
				</el-col>

				<el-col :xs="24" :sm="24" :lg="12">
					<el-form-item label="封面图">
						<el-image
							v-if="form.img"
							style="width: 200px; height: 200px"
							:src="$fullUrl(form.img)"
							:preview-src-list="[$fullUrl(form.img)]">
							<div slot="error" class="image-slot">
								<img src="/img/error.png" style="width: 190px; height: 190px" />
							</div>
						</el-image>
						<span v-else>无封面图</span>
					</el-form-item>
				</el-col>

				<el-col :xs="24" :sm="24" :lg="12">
					<el-form-item label="收藏时间">
						<el-input :value="$toTime(form.create_time,'yyyy-MM-dd hh:mm:ss')" disabled></el-input>
					</el-form-item>
				</el-col>

				<el-col :xs="24" :sm="24" :lg="12">
					<el-form-item label="更新时间">
						<el-input :value="$toTime(form.update_time,'yyyy-MM-dd hh:mm:ss')" disabled></el-input>
					</el-form-item>
				</el-col>

				<el-col :xs="24" :sm="24" :lg="24">
					<el-form-item>
						<el-button @click="cancel()">返回</el-button>
					</el-form-item>
				</el-col>
			</el-row>
		</el-form>
	</el-main>
</template>

<script>
	import mixin from "@/mixins/page.js";

	export default {
		mixins: [mixin],
		data() {
			return {
				url_get_obj: "~/api/collect/get_obj?",
				field: "collect_id",
				query: {},
				form: {
					collect_id: 0,
					user_id: 0,
					title: "",
					source_table: "",
					source_id: 0,
					img: "",
					create_time: "",
					update_time: ""
				}
			}
		},
		methods: {
			cancel() {
				this.$router.go(-1);
			}
		},
		created() {
			this.get_obj();
		}
	}
</script>

<style type="text/css">

</style>


